<?php

class ELMModel extends commonModel {


    public function __construct() {
        $this->initialDB();
    }


    public function _del($sql) {
        $this->db->setStatement($sql);
        $mysql_results = $this->db->execute();
        return $mysql_results;
    }



    /**
     *
     * @return array 饿了吗SHOPID
     */
    public function getElmShopID(){

        $sql = " SELECT elm_shop_id FROM `xd_store` WHERE isdeleted=0 AND length(elm_shop_id)>0   ";
        $this->db->setStatement($sql);
        $result= $this->db->execute();
        $result=$this->getArray($result);
        return $result;
    }

    /**
     *
     * @return array 饿了吗SHOPID
     */
    public function getToken(){
        $sql = " SELECT * FROM `access_token` WHERE `type`='access_token' ";
        $this->db->setStatement($sql);
        $result= $this->db->execute();
        $result=$this->getArray($result,'one');
        return $result;
    }



}